package com.example.idachuappone.cook.entity;

import java.io.Serializable;

import org.json.JSONObject;

public class Tags implements Serializable {
	private String id;
	private String name;
	private String type;

	public Tags parseJson(JSONObject json) {
		if (json == null) {
			return null;
		}
		if (json.has("id")) {
			this.id = json.optString("id");
		}
		if (json.has("name")) {
			this.name = json.optString("name");
		}
		if (!json.has("type")) {
			return this;
		}
		this.type = json.optString("type");
		return this;
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Tags(String id, String name, String type) {
		this.id = id;
		this.name = name;
		this.type = type;
	}

	/**
	 * 
	 */
	public Tags() {
		// TODO Auto-generated constructor stub
	}
}
